import java.io.*;
import java.net.*;
import java.util.*;
public class Client_Main {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
    Socket mysocket=null;
    DataInputStream in=null;
    DataOutputStream out=null;
        Thread readData;
        Read read=null;
        try{
        mysocket=new Socket();
        read =new Read();
            readData=new Thread(read);//负责读取信息的线程
            System.out.print("输入服务器的IP：");
        String IP=scanner.nextLine();
            System.out.print("输入端口号：");
            int port=scanner.nextLine();
            if (mysocket.isConnected()){}
            else{
            InetAddress address=InetAddress.getByName("10.43.11.98");
            InetSocketAddress socketAddress=new InetSocketAddress（address,port);
            mysocket.connect(socketAddress);
            in =new DataInputStream(mysocket.getInputStream());
            out =new DataOutputStream(mysocket.getOutputStream());
            read.setDataInputStream（in）;
            readData.start();//启动负者读取信息的线程
            }
        }
    catch(Exception e){
             System.out.println("服务器已断开"+e);
    }
    System.out.print("输入圆的半径（放弃请输入N）：");
    while(scanner.hasNext()){
         double radius =0;
         try{
        radius=scanner.nextDouble();
        }
         catch (InputMismatchException exp){
        System.exit(0);
                }
         try {
        out.writeDouble(radius);
         }
         catch(Exception e){}
           }
      }
}